-
Notifications
You must be signed in to change notification settings - Fork 2k
feat: Added support for OpenAI's File API. #3913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Added support for OpenAI's File API. #3913
Conversation
1. Introduced the OpenAiFileApi class. 2. Implemented corresponding unit tests and integration tests. Signed-off-by: Sun Yuhan <[email protected]>
Hi @markpollack, What do you think about this? Could you please help review it? |
I’m planning to build Batch API support based on this—thanks for the clean implementation! Let me know if you foresee any changes that might affect downstream usage. |
No problem! BTW, @ilayaperumalg, could you please help review the current PR? |
…ccording to checkstyle requirements. Signed-off-by: Sun Yuhan <[email protected]>
Signed-off-by: Sun Yuhan <[email protected]>
Signed-off-by: Sun Yuhan <[email protected]>
Just synchronized the latest main branch code and corrected the code style according to the latest checkstyle guidelines. |
@sunyuhan1998 Thanks for adding the support for File API. LGTM, merging. |
Squashed, rebased and merged as 087393b |
@sunyuhan1998 Could you add documentation for this change? |
No problem, I'll submit a new PR soon to add the relevant documentation. |
This PR is essentially an independent implementation aimed at achieving #3905.
The issue mentions our need to support OpenAI's
Batch API
. I noticed that theBatch API
is built on top of theFiles API
, and besides theBatch API
, components such asAssistants
andFine-tuning
also depend on theFiles API
. Therefore, I believe we should implement support for these APIs step by step.This PR first adds support for the
Files API
.What does this PR do:
OpenAiFileApi
class that provides full support for OpenAI's Files API.The
OpenAiFileApi
class mainly includes the following methods:The implementation of the above interfaces strictly follows OpenAI's official documentation: Files API